<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>

<?php echo $layout_for_common;?>

<script type="text/javascript">
	$(document).ready(function(){
		
		//全选
		$('#check_all').click(function(){
			$('.access_checkbox').find(':checkbox').prop('checked', $(this).prop('checked'));
		});

	});
</script>
</head>
<body>
	<div id="wrap">

		<div class="nav">
			<a href="<?php echo $this->session->get('back');?>" class="button">返回</a>
		</div>
		
		<div class="tabs">
			<ul>
				<li><a href="#tabs-default">添加管理员</a></li>
			</ul>
			<div id="tabs-default">
				<form action="__SELF__" method="post">
					<table class="form">
						<tr>
							<td width="100">用户名：</td>
							<td><input type="text" name="username" value="" class="text" /></td>
						</tr>
						<tr>
							<td>密码：</td>
							<td><input type="text" name="password" value="" class="text" /></td>
						</tr>
						<tr>
							<td>邮箱：</td>
							<td><input type="text" name="email" value="" class="text" /></td>
						</tr>
						<tr>
							<td>真实姓名：</td>
							<td><input type="text" name="real_name" value="" class="text" /></td>
						</tr>
						<tr>
							<td>是否禁用：</td>
							<td>
								<input type="radio" name="banned" value="1" id="banned_yes" /> <label for="banned_yes">是</label>&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="radio" name="banned" value="0" checked="true" id="banned_no" /> <label for="banned_no">否</label>
							</td>
						</tr>
						<tr>
							<td>分组：</td>
							<td>
								<select name="group_id" class="text">
									<option value="0">请选择</option>
									<?php
										foreach ($group_list as $row)
										{
									?>
									<option value="<?php echo $row['id'];?>"><?php echo $row['name'];?></option>
									<?php
										}
									?>
								</select>
							</td>
						</tr>
						<tr>
							<td class="w100" valign="top">权限：</td>
							<td>
								<input type="checkbox" id="check_all" value="1" /> <label for="check_all">全选</label><br /><br /><br />
								<ul class="access_checkbox">
									<?php
										foreach ($access_list as $row)
										{
									?>
									<li><input type="checkbox" name="access[]" value="<?php echo $row['id'];?>" id="access_<?php echo $row['id'];?>" /> <label for="access_<?php echo $row['id'];?>"><?php echo $row['name'];?></label></li>
									<?php
										}
									?>
								</ul>
							</td>
						</tr>
						<tr>
							<td colspan="2"><input type="submit" value="提交" class="button" /></td>
						</tr>
					</table>
				</form>
			</div>
		</div>
	</div>
</body>
</html>